package cn.krund.lyc.hotlerobot.utils;

import android.util.Log;

/**
 * @包名: cn.krund.lyc.hotlerobot.utils
 * @作者: 刘育成
 * @时间: 2018/3/22  10:15
 * @org: 克路德人工智能
 * @描述: TODO
 * @fileName: LogUtils
 */
public class LogUtils {

    public static final boolean DEBUG = true;
    public static final String TAG = "TAG";
    private static LogUtils sLogUtil;

    private LogUtils() {
    }

    public static LogUtils getInstance() {
        if (sLogUtil == null) {
            synchronized (LogUtils.class) {
                if (sLogUtil == null) {
                    sLogUtil = new LogUtils();
                }
            }
        }
        return sLogUtil;
    }

    public static void debug(String msg) {
        if (DEBUG) {
            Log.d(TAG, msg);
        }
    }

    public static void info(String msg) {
        if (DEBUG) {
            Log.i(TAG, msg);
        }
    }

    public static void error(String msg) {
        if (DEBUG) {
            Log.e(TAG, msg);
        }
    }

    public static void warn(String msg) {
        if (DEBUG) {
            Log.w(TAG, msg);
        }
    }
}
